package domain

import (
	"context"
	"google.golang.org/protobuf/types/known/timestamppb"
	"time"
)

type CreateOrder struct {
	AppId             int32
	Brand             int32
	MerchantId        int32
	MerchantUserId    int32
	Ext               *OrderExt
	Barcodes          []*OrderBarcodeCreate
	OriginalItemCodes []string
	Users             []*OrderUserCreate
}

type OrderExt struct {
	Remark            string
	Department        string
	OutpatientNo      string
	BedNo             string
	ClinicalDiagnosis string
}

type OrderBarcodeCreate struct {
	Barcode      string
	SamplingTime *timestamppb.Timestamp
	Consumable   string
	Number       int32
	ItemCodes    []string
}

type OrderUserCreate struct {
	UserId   int64
	Name     string
	Age      int32
	Sex      int32
	Mobile   string
	CardType int32
	CardId   string
}

type SearchOrderList struct {
	Id         int64
	OrderSn    string
	Source     int32
	Status     int8
	SettleType int8
	PriceArea  int64
	Brand      int32
	MerchantId int64
	CreatedAt  []*time.Time
	PageSize   int32
}

type OrderUsecase interface {
	CreateOrder(ctx context.Context, do *CreateOrder) (int64, error)
}
